import BaseInput from "@/components/ProForm/BaseInput.vue";
import BaseCascader from '@/components/ProForm/BaseCascader.vue'
import BaseCheckBox from '@/components/ProForm/BaseCheckBox.vue'
import BaseColorPicker from '@/components/ProForm/BaseColorPicker.vue'
import BaseDatePicker from '@/components/ProForm/BaseDatePicker.vue'
import BaseDateTimePicker from '@/components/ProForm/BaseDateTimePicker.vue'
import BaseInputNumber from '@/components/ProForm/BaseInputNumber.vue'
import BaseRadio from '@/components/ProForm/BaseRadio.vue'
import BaseSelect from '@/components/ProForm/BaseSelect.vue'
import BaseSwitch from '@/components/ProForm/BaseSwitch.vue'
import BaseTimePicker from '@/components/ProForm/BaseTimePicker.vue'
import BaseTimeSelect from '@/components/ProForm/BaseTimeSelect.vue'
import BaseUpload from '@/components/ProForm/BaseUpload.vue'
import BaseDropdown from '@/components/ProForm/BaseDropdown.vue'




// const options = [
//     {
//         value: 'Option1',
//         label: 'Option1',
//       },
//       {
//         value: 'Option2',
//         label: 'Option2',
//       },
//       {
//         value: 'Option3',
//         label: 'Option3',
//       },
//       {
//         value: 'Option4',
//         label: 'Option4',
//       },
//       {
//         value: 'Option5',
//         label: 'Option5',
//       },
// ]
const options = []
export const addeditConfig = {
    formProps: { // 表单属性
        labelPosition: 'right',
        labelWidth: 'auto',
        row: true,
        style: {
            display: 'flex'
        }
    },
    formItems: [{
            name: BaseInput,
            props: {
                label: '職員登入名',
                prop: 'username',
                borderBottom: true,
                span: 12,
            },
            elProps: {
                placeholder: '',
            },
            value: ''
        },
        {
            name: BaseInput,
            props: {
                label: '密碼',
                prop: 'password',
                borderBottom: true,
                span: 12,
            },
            elProps: {
                placeholder: '',
                type: 'password',
            },
            value: ''
        },
        {
            name: BaseInput,
            props: {
                label: '郵箱',
                prop: 'email',
                borderBottom: true,
                span: 12,
            },
            elProps: {
                placeholder: '',
            },
            value: ''
        },
        {
            name: BaseInput,
            props: {
                label: '手機',
                prop: 'mobile',
                borderBottom: true,
                span: 12,
            },
            elProps: {
                placeholder: '',
            },
            value: ''
        },
        {
            name: BaseInput,
            props: {
                label: '中文名字',
                prop: 'name',
                borderBottom: true,
                span: 12,
            },
            elProps: {
                placeholder: '',
            },
            value: ''
        },
        {
            name: BaseInput,
            props: {
                label: '英文名字',
                prop: 'ename',
                borderBottom: true,
                span: 12,
            },
            elProps: {
                placeholder: '',
            },
            value: '' // 值（可按需设置不同类型值）
        },


        {
            name: BaseSelect,
            options: options,
            props: {
                label: '所屬學校',
                prop: 'belong_school',
                span: 12,
            },
            elProps: {
                placeholder: '',
                clearable: true,
                multiple: false,
            },
            value: ''
        },
        {
            name: BaseSelect,
            options: options,
            props: {
                label: '可選學校',
                prop: 'school_id',
                span: 12,
            },
            elProps: {
                placeholder: '',
                clearable: true,
                multiple: true,
            },
            value: []
        },
        {
            name: BaseSelect,
            options: options,
            props: {
                label: '職位',
                prop: 'role_id',
                span: 12,
            },
            elProps: {
                placeholder: '',
                clearable: true,
                multiple: false,
            },
            value: ''
        },
        {
            name: BaseSelect,
            options: [{
                    value: 1,
                    label: '正常',
                },
                {
                    value: -1,
                    label: '禁用',
                },
            ],
            props: {
                label: '狀態',
                prop: 'status',
                span: 12,
            },
            elProps: {
                placeholder: '',
                clearable: true,
                multiple: false,
            },
            value: ''
        },
        {
            name: BaseColorPicker,
            props: {
                label: '顏色',
                prop: 'color',
                span: 12,
            },
            elProps: {
                placeholder: '',
                clearable: true,
                multiple: false,
            },
            value: ''
        }
    ],
    rules:{
        'username':[{
            // type:'number', 
            required: true,
            message: '请填写账号',
            trigger: ['blur', 'change'],
        }],
        'password':{
            required: true,
            message: '请填写密码',
        },
        "ename":{
            required: true,
            message: '请填寫英文名字',
        },
        'belong_school':{
            required: true,
            message: '请選擇所屬學校',
        },
     
        'school_id':{
            required: true,
            message: '请選擇可選學校',
        },
        'role_id':{
            required: true,
            message: '请選擇職位',
        }

    }
}